<template>
  <!--查看老师/学生信息弹框-->
  <div>
    <edu-dialog :title="$t('graduationDesign.view')+ (viewType==='STU' ? $t('graduationDesign.student') : $t('graduationDesign.tutor')) + $t('graduationDesign.info')" width="50%" @close="onClose" :visible="dialogVisible">
      <el-form :model="teacherStuForm" ref="teacherStuForm" label-position="right" label-suffix="：" label-width="120px">
        <section v-if="viewType === 'STU'">
          <el-row>
            <el-col :span="12">
              <el-form-item :label="$t('graduationDesign.studentId')">
                <span>{{teacherStuForm.studentId}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item :label="$t('graduationDesign.name')">
                <span>{{teacherStuForm.studentName}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item :label="$t('graduationDesign.college')">
                <span>{{teacherStuForm.collegeI18n}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item :label="$t('graduationDesign.contactNumber')">
                <span>{{teacherStuForm.phone}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item :label="$t('graduationDesign.mailbox')">
                <span>{{teacherStuForm.email}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item :label="$t('graduationDesign.tutor')">
                <span>{{teacherStuForm.teacherName}}</span>
              </el-form-item>
            </el-col>
          </el-row>
        </section>

        <section v-if="viewType === 'TEACHER'">
          <el-row>
            <el-col :span="12">
              <el-form-item :label="$t('graduationDesign.jobNumber')">
                <span>{{teacherStuForm.teacherId}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item :label="$t('graduationDesign.name')">
                <span>{{teacherStuForm.teacherName}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item :label="$t('graduationDesign.college')">
                <span>{{teacherStuForm.collegeI18n}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item :label="$t('graduationDesign.jobTitle')">
                <span>{{teacherStuForm.titleName}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item :label="$t('graduationDesign.mailbox')">
                <span>{{teacherStuForm.email}}</span>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item :label="$t('graduationDesign.phone')">
                <span>{{teacherStuForm.phone}}</span>
              </el-form-item>
            </el-col>
          </el-row>
        </section>
      </el-form>
      <div slot="buttons">
        <el-button @click="onClose">{{$t('graduationDesign.return')}}</el-button>
      </div>
    </edu-dialog>
  </div>
</template>
<script>

export default {
  name: 'teacherStuDialog',
  props: {
    dialogVisible: {
      type: Boolean,
      default: false
    },
    teacherStuForm: {
      type: Object,
      default: {}
    },
    // 老师/学生
    viewType: {
      type: String,
      default: ''
    }
  },
  data() {
    return {};
  },
  mounted() { },
  methods: {
    onClose() {
      this.$emit("teacher-stu-close");
    }
  }
}
</script>
<style lang="scss" scoped>
</style>
